package com.itheima.blog.admin.controller;

import com.itheima.blog.admin.entity.TLog;
import com.itheima.blog.admin.service.ITLogService;
import com.itheima.common.domain.PageResDto;
import com.itheima.common.query.PageQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 日志管理接口
 * </p>
 *
 * @author jxp
 * @since 2023-07-12
 */

@Validated
@RestController
@RequestMapping("")
@Api(tags = "日志管理")
@RequiredArgsConstructor
public class TLogController {
    private final ITLogService logService;

    @ApiOperation(value = "分页获取操作日志", notes = "获取操作日志", response = String.class)
    @PostMapping("/system/operate/log")
    public PageResDto<TLog> getPageList(@RequestBody PageQuery page) {
        return logService.getPageList(page);
    }

}
